//
//  ConstHeader.h
//  WeMent
//
//  Created by yanxun on 14-8-25.
//  Copyright (c) 2014年 PlayBall. All rights reserved.
//

#ifndef Jdd_ConstHeader_h
#define Jdd_ConstHeader_h

#define GET_INSTANCE_VIEW_DECLARE(className)\
+(className*)getInstanceView;

#define GET_INSTANCE_VIEW_IMPLEMENT(className)\
+(className*)getInstanceView{\
return [[[NSBundle mainBundle] loadNibNamed:@""#className"" owner:self options:nil] objectAtIndex:0];\
}

#define SHARED_VIEW_CONTROLLER_DECLARE(className)\
+(className*)sharedInstance;

#define SHARED_VIEW_CONTROLLER_IMPLEMENT(className)\
+(className*)sharedInstance{\
static className *_##className = nil;\
if (!_##className){\
_##className = [[className alloc] initWithNibName:@""#className"" bundle:nil];\
}\
return _##className;\
}

#define OPERATION_DELEGATE_DECLARE(operationClassName) \
@property (weak, nonatomic) id<operationClassName##Delegate > delegate;

#define OPERATION_DELEGATE_SYNTHESIZE \
@synthesize delegate;

#define OPERATION_DELEGATE_DEFINE(operationClassName)\
@protocol operationClassName##Delegate <JddBaseOperationDelegate>\
-(void)operationClassName##Result:(NSData*)result;\
@end

#define SHARED_INSTANCE_DECLARE(className)\
+(className*)sharedInstance ;

#define SHARED_INSTANCE_DEFINE(className)\
+(className*)sharedInstance{\
static className *_##className = nil;\
if (!_##className){\
_##className = [[className alloc] init];\
}\
return _##className;\
}

#define GLOBAL_PLATFORM                @"IPHONE"
#define GLOBAL_SIGN_KEY                @"8888"

#define GLOBAL_PARAMETER_USER          @"User"
#define GLOBAL_PARAMETER_PASSWORD      @"Password"
#define GLOBAL_PARAMETER_SHOP_ID       @"ShopID"
#define GLOBAL_PARAMETER_SAVE_PASSWORD @"SavePassword"
#define GLOBAL_PARAMETER_AUTO_LOGON    @"AutoLogon"
#define GLOBAL_PARAMETER_USER_ID       @"UserId"

#define LOTTERY_TYPE_ID_SF             1    //胜负彩
#define LOTTERY_TYPE_ID_4CJQC          2	//四场进球彩
#define LOTTERY_TYPE_ID_7XC            3    //七星彩
#define LOTTERY_TYPE_ID_SHUANGSEQIU    5    //双色球
#define LOTTERY_TYPE_ID_FC3D           6    //福彩3d
#define LOTTERY_TYPE_ID_22X5           9    //22选5
#define LOTTERY_TYPE_ID_7LC            13   //七乐菜
#define LOTTERY_TYPE_ID_6CBQC          15	//六场半全场
#define LOTTERY_TYPE_ID_RX9            19   //任选9
#define LOTTERY_TYPE_ID_CQSSC          28   //重庆时时彩
#define LOTTERY_TYPE_ID_DALETOU        39   //大乐透
#define LOTTERY_TYPE_ID_BJZCDC         45   //北京单场－足彩
#define LOTTERY_TYPE_ID_JXSSC          61   //江西时时彩
#define LOTTERY_TYPE_ID_11YDJ          62   //11运夺金
#define LOTTERY_TYPE_ID_PL3            63   //排列3
#define LOTTERY_TYPE_ID_PL5            64   //排列5
#define LOTTERY_TYPE_ID_NMGK3          66   //内蒙古快3
#define LOTTERY_TYPE_ID_11S5           70   //11选5
#define LOTTERY_TYPE_ID_XYSC           72   //幸运赛车
#define LOTTERY_TYPE_ID_X11S5          73   //新11选5
#define LOTTERY_TYPE_ID_XK3            75   //新快3
#define LOTTERY_TYPE_ID_JCZQ           90   //竞彩足球
#define LOTTERY_TYPE_ID_JCLQ           91	//竞彩篮球
#define LOTTERY_TYPE_ID_CGJWF          95	//猜冠军玩法
#define LOTTERY_TYPE_ID_HEMAI_HELP     -100 //合买帮助

#define LOTTERY_PLAY_METHOD__DS_SHUANGSEQIU 501
#define LOTTERY_PLAY_METHOD__FS_SHUANGSEQIU 502

#define LOTTERY_PLAY_METHOD__DS_QILECAI 1301
#define LOTTERY_PLAY_METHOD__FS_QILECAI 1302

#define LOTTERY_PLAY_METHOD_DALETOU_DS     3901
#define LOTTERY_PLAY_METHOD_DALETOU_FS     3902

#define LOTTERY_PLAY_METHOD_11S5_ANY1   7001
#define LOTTERY_PLAY_METHOD_11S5_ANY2   7002
#define LOTTERY_PLAY_METHOD_11S5_ANY3   7003
#define LOTTERY_PLAY_METHOD_11S5_ANY4   7004
#define LOTTERY_PLAY_METHOD_11S5_ANY5   7005
#define LOTTERY_PLAY_METHOD_11S5_ANY6   7006
#define LOTTERY_PLAY_METHOD_11S5_ANY7   7007
#define LOTTERY_PLAY_METHOD_11S5_ANY8   7008
#define LOTTERY_PLAY_METHOD_11S5_ONLY2  7009
#define LOTTERY_PLAY_METHOD_11S5_ONLY3  7010
#define LOTTERY_PLAY_METHOD_11S5_GROUP2 7011
#define LOTTERY_PLAY_METHOD_11S5_GROUP3 7012

#define LOTTERY_PLAY_METHOD_11YDJ_ANY0   6200
#define LOTTERY_PLAY_METHOD_11YDJ_ANY1   6201
#define LOTTERY_PLAY_METHOD_11YDJ_ANY2   6202
#define LOTTERY_PLAY_METHOD_11YDJ_ANY3   6203
#define LOTTERY_PLAY_METHOD_11YDJ_ANY4   6204
#define LOTTERY_PLAY_METHOD_11YDJ_ANY5   6205
#define LOTTERY_PLAY_METHOD_11YDJ_ANY6   6206
#define LOTTERY_PLAY_METHOD_11YDJ_ANY7   6207
#define LOTTERY_PLAY_METHOD_11YDJ_ANY8   6208
#define LOTTERY_PLAY_METHOD_11YDJ_ONLY2  6209
#define LOTTERY_PLAY_METHOD_11YDJ_ONLY3  6210
#define LOTTERY_PLAY_METHOD_11YDJ_GROUP2 6211
#define LOTTERY_PLAY_METHOD_11YDJ_GROUP3 6212

//足球
#define LOTTERY_TYPE_ID_FOOTBALL            90
#define LOTTERY_PLAY_METHOD_FOOTBALL        9001 //让球胜平负
#define LOTTERY_PLAY_METHOD_FOOTBALL_ZJQ    9002 //总进球
#define LOTTERY_PLAY_METHOD_FOOTBALL_BF     9003 //比分
#define LOTTERY_PLAY_METHOD_FOOTBALL_BQC    9004 //半全场
#define LOTTERY_PLAY_METHOD_FOOTBALL_HH     9005 //混合
#define LOTTERY_PLAY_METHOD_FOOTBALL_SPF    9006 //胜平负

//福彩3d
#define LOTTERY_TYPE_ID_FC3D            6
#define LOTTERY_PLAY_METHOD_FC3D_ZX     602
#define LOTTERY_PLAY_METHOD_FC3D_ZX_DS  601

#define LOTTERY_PLAY_METHOD_FC3D_ZX3    605
#define LOTTERY_PLAY_METHOD_FC3D_ZX6    604

//篮球
#define LOTTERY_TYPE_ID_BASKETBALL            91
#define LOTTERY_PLAY_METHOD_BASKETBALL_RFSF   9101//让分胜负
#define LOTTERY_PLAY_METHOD_BASKETBALL_SF     9102//胜负
#define LOTTERY_PLAY_METHOD_BASKETBALL_SFC    9103//胜分差
#define LOTTERY_PLAY_METHOD_BASKETBALL_DXF    9104//大小分
#define LOTTERY_PLAY_METHOD_BASKETBALL_HH     9105//混合

//重庆时时彩
#define LOTTERY_TYPE_ID_CQSS            28
#define LOTTERY_TYPE_ID_CQSS_ZX         2803 //直选
#define LOTTERY_TYPE_ID_CQSS_TX         2806 //通选
#define LOTTERY_TYPE_ID_CQSS_FX         2802 //复选
#define LOTTERY_TYPE_ID_CQSS_ZUX        2808 //组选
#define LOTTERY_TYPE_ID_CQSS_DXDS       2804 //大小单双复式

//北单
#define LOTTERY_TYPE_ID_BD              45
#define LOTTERY_PLAY_METHOD_BD          4501//让球胜平负
#define LOTTERY_PLAY_METHOD_BD_ZJQ      4502//总进球
#define LOTTERY_PLAY_METHOD_BD_SXDS     4503//上下单双
#define LOTTERY_PLAY_METHOD_BD_BF       4504//比分
#define LOTTERY_PLAY_METHOD_BD_BQC      4505//半全场

//七乐彩
#define LOTTERY_TYPE_ID_7LC             13
//七星彩
#define LOTTERY_TYPE_ID_7XC             3
#define LOTTERY_PLAY_METHOD__DS_QIXINGCAI 301
#define LOTTERY_PLAY_METHOD__FS_QIXINGCAI 302

#define LOTTERY_HALL_HOME -1
#define LOTTERY_OPEN_HOME -2
#define USER_CENTER_HOME -3
#define SETTING_HOME -4
#define SCORE_HOME -5
#define TOGETHER_BUY_HOME -6


#define ALIPAY_ID_MESSAGE    @"alipayId"
#define CQSS_MESSAGE    @"Timer"

#define kDEFAULT_DATE_TIME_FORMAT @"yyyy-MM-dd HH:mm:ss"
#define kDEFAULT_DATE_FORMAT @"yyyy-MM-dd"

#define TIMEOUT_INTERVAL 30.0

#define LOADIMAGE(file) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:file ofType:@"png"]]

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)

#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#define SPORT_CHILD_VIEW_FRAME CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - 64 - 49)

//
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
//
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed : ((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green : ((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue : ((float)(rgbValue & 0xFF)) / 255.0 alpha : 1.0]


//NSUserDefaults 实例化
#define USER_DEFAULT [NSUserDefaults standardUserDefaults]
#define FAVORITE_SCORES @"%@/favoriteScores.plist"
//生成UUID
#define USER_UUID @"USER_UUID"

#define UIColorRef(red1,green1,blue1) [UIColor colorWithRed:red1/255.0f green:green1/255.0f blue:blue1/255.0f alpha:1.0f]

#define APP_NAME                @"温馨提示"

#define OK                      @"确定"
#define CANCEL                  @"取消"

#define REGISTER                @"注册"
#define LOGON                   @"登录"
#define CHECK_VERSION           @"检查版本"
#define CONTACT_SERVICE         @"联系客服"
#define ABOUT                   @"关于"
#define EXIT                    @"退出"
#define DELETE                  @"删除"

#define HEIGHT                  100
#define PAGE_HOME               @"玩球网"
#define PAGE_LOTTERY_HALL       @"购彩大厅"
#define PAGE_LOTTERY_HALL1      @"玩球网王谦网"
#define PAGE_TOGETHER_BUY       @"合买大厅"
#define PAGE_LOTTERY_SERVICE    @"服务"
#define PAGE_LOTTERY_OPEN       @"开奖信息"
#define PAGE_LOTTERY_OPEN_LIST  @"开奖信息列表"
#define PAGE_USER_CENTER        @"账户中心"
#define PAGE_TOGETHER_BUY_DETAIL @"合买详情"
#define PAGE_BUY_HISTORY        @"投注记录"
#define PAGE_BUY_DETAIL         @"方案详情"
#define PAGE_USERCENTER_MORE    @"更多"
#define PAGE_REGISTER           @"注册"
#define PAGE_LOGON              @"登录"
#define PAGE_FOLLOW_NUMBER_HISTORY @"追号记录"
#define PAGE_ACCOUNT_DETAIL     @"帐户明细"
#define PAGE_RECHARGE           @"充值"
#define PAGE_ALIPAY_RECHARGE    @"支付宝充值"
#define PAGE_UM_RECHARGE    @"信用卡充值"
#define PAGE_WITHDRAW           @"提款申请"
#define PAGE_BIND_MOBILE        @"绑定手机"
#define PAGE_BIND_CARD          @"绑定银行卡"
#define PAGE_MODIFY_PASSWORD    @"修改密码"
#define PAGE_USER_PROFILE       @"个人信息"
#define PAGE_SHUANGSEQIU_PICK_NUMBER @"双色球"
#define PAGE_SHUANGSEQIU_PICK_NUMBER_LIST @"双色球选号列表"
#define PAGE_7L_PICK_NUMBER     @"七乐彩"
#define PAGE_7L_PICK_NUMBER_LIST @"七乐彩选号列表"
#define PAGE_7X_PICK_NUMBER     @"七星彩"
#define PAGE_7X_PICK_NUMBER_LIST @"七星彩选号列表"
#define PAGE_DALETOU_PICK_NUMBER @"大乐透"
#define PAGE_DALETOU_PICK_NUMBER_LIST @"大乐透选号列表"
#define PAGE_SPORT_PICK_NUMBER_LIST @"竞彩足球选队列表"
#define PAGE_SPORT_PICK_NUMBER @"竞彩足球选队"
#define PAGE_11S5_PICK_NUMBER   @"11选5"
#define PAGE_11S5_PICK_NUMBER_LIST @"11选5选号列表"
#define PAGE_11YDJ_PICK_NUMBER   @"11运夺金"
#define PAGE_CQSS_PICK_NUMBER   @"重庆时时彩"
#define PAGE_CQSS_PICK_NUMBER_LIST @"重庆时时彩选号列表"

#define PAGE_11YDJ_PICK_NUMBER_LIST @"11运夺金选号列表"
#define PAGE_FC3D_PICK_NUMBER   @"福彩3D"
#define PAGE_FC3D_PICK_NUMBER_LIST   @"福彩3D选号列表"
#define PAGE_SPORT_OPEN @"查看赛果"
#define PAGE_SELECT_FIVE_OPEN_DETAIL @"11选5开奖详情"
#define PAGE_SHUANGSEQIU_OPEN_LIST @"双色球开奖信息列表"
#define PAGE_DALETOU_OPEN_LIST @"大乐透开奖信息列表"
#define PAGE_SELECT_FIVE_OPEN_LIST @"11选5开奖信息列表"
#define PAGE_11YDJ_OPEN_DETAIL @"11运夺金开奖详情"

#define PAGE_OPEN_DETAIL @"开奖详情"
#define PAGE_ABOUT       @"关于"
#define PAGE_CONTACT_US  @"联系客服"
#define PAGE_CHECK_VERSION @"检查版本"
#define PAGE_HOW_TO_PLAY_SSQ @"双色球玩法介绍"
#define PAGE_HOW_TO_PLAY_DLT @"大乐透玩法介绍"
#define PAGE_HOW_TO_PLAY_11S5 @"11选5玩法介绍"
#define PAGE_HOW_TO_PLAY_SPORT @"竞彩足球玩法介绍"

#define PLAYMETHOD_ANY1 @"任选一"
#define PLAYMETHOD_ANY2 @"任选二"
#define PLAYMETHOD_ANY3 @"任选三"
#define REGISTER_SUCCEEDED      @"注册成功"
#define PLEASE_INPUT_USER_NAME  @"请输入用户名"
#define PASSWORD_CONFIRM_FAILED @"两次输入的密码不一致"
#define NAME_PASSWORD_NOT_ALLOWED_EMPTY @"用户名或密码不能为空"
#define NAME_PHNOE_NOT_ALLOWED_EMPTY @"用户名或手机号码不能为空"
#define PLEASE_INPUT_MOBILE     @"请输入合法的手机号"
#define PLEASE_INPUT_PASSWORD_S   @"密码的长度不能小于6个字符"
#define PLEASE_INPUT_PASSWORD_F   @"密码的长度不能大于15个字符"
#define PLEASE_INPUT_VERIFY_CODE @"请输入验证码"

#define INFORMATION_NOT_INTACT  @"信息输入不完整"
#define PLEASE_SELECT_PROVINCE  @"请选择省份"
#define PLEASE_SELECT_CITY      @"请选择城市"
#define PLEASE_SELECT_BANK      @"请选择银行"
#define BALL_COUNT_NOT_CORRECT  @"色球选择的数量不正确,请检查"
#define BALL_COUNT_NULL         @"投注列表不能为空"
#define BALL_COUNT_NOT_CORRECT_RED  @"红球至少选择6个号码"
#define BALL_COUNT_NOT_CORRECT_BLUE  @"蓝球至少选择1个号码"
#define BALL_COUNT_NOT_CORRECT_HEAD  @"前区至少选择5个号码"
#define BALL_COUNT_NOT_CORRECT_BACK  @"后区至少选择2个号码"
#define PICK_NUM_11S5_NOT_CORRECT_1 @"请至少选择1个号码"
#define PICK_NUM_11S5_NOT_CORRECT_2 @"请至少选择2个号码"
#define PICK_NUM_11S5_NOT_CORRECT_3 @"请至少选择3个号码"
#define PICK_NUM_11S5_NOT_CORRECT_4 @"请至少选择4个号码"
#define PICK_NUM_11S5_NOT_CORRECT_5 @"请至少选择5个号码"
#define PICK_NUM_11S5_NOT_CORRECT_6 @"请至少选择6个号码"
#define PICK_NUM_11S5_NOT_CORRECT_7 @"请至少选择7个号码"
#define PICK_NUM_11S5_NOT_CORRECT_8 @"请至少选择8个号码"
#define PICK_NUM_11S5_NOT_CORRECT_9 @"第一位请至少选择1个号码"
#define PICK_NUM_11S5_NOT_CORRECT_10 @"第二位请至少选择1个号码"
#define PICK_NUM_11S5_NOT_CORRECT_11 @"第三位请至少选择1个号码"

#define FC3D_ZHX_TIP @"直选每一位至少需要选择一个数字!"
#define FC3D_ZX3_TIP @"组选三至少需要选择二个数字!"
#define FC3D_ZX6_TIP @"组选六至少选择三个数字!"

#define FB_RESULT_TITLE @"竞彩足球开奖详情"
#define BB_RESULT_TITLE @"竞彩篮球开奖详情"
#define BD_RESULT_TITLE @"北京单场开奖详情"

#define PICK_NUM_N7X_NOT_CORRECT @"每一星最少选择一个数字"

#define PAGE_P3_PICK_NUMBER   @"排列3"
#define PAGE_P3_PICK_NUMBER_LIST   @"排列3选号列表"

#define PAGE_P5_PICK_NUMBER   @"排列5"
#define PAGE_P5_PICK_NUMBER_LIST   @"排列5选号列表"

#define PICK_NUM_P5_NOT_CORRECT    @"每一位至少选择一个数字"
#define TOGETHER_BUY_NOT_EMPTY    @"输入金额不能为空或0"
#define TOGETHER_BUY_NOT_RSHARE    @"购买金额不能超出可认购金额"
#define TOGETHER_BUY_SURE    @"是否确认购买？"
#define LOGIN_SURE @"您还没有登录，请先登录"
#define PAGE_22X5_PICK_NUMBER      @"22选5"
#define PAGE_22X5_PICK_NUMBER_LIST @"22选5选号列表"

#define MULTIPLE_Tip @"请输入倍数!"

#define REGISTER_NOT_READ @"必须年满18周岁且已同意《彩票服务条款》!"
#define BUY_NOT_READ @"需要同意《代购合买协议》才可以继续购买"

//device token
#define K_UserDefault_DeviceToken         @"K_UserDefault_DeviceToken"

//引导页
#define K_UserDefault_IsShowAppGuideImage           @"K_UserDefault_IsShowAppGuideImage"

//分割线
#define SeparatorLineColor [UIColor colorWithRed:218.0f/255.0f green:218.0f/255.0f blue:218.0f/255.0f alpha:1.0f]

//边界颜色
#define BORDER_COLOR [UIColor colorWithRed:220/255.0f green:220/255.0f blue:220/255.0f alpha:1.0].CGColor   //zbj add


#endif
